package com.bgs.eat.shop.mapper;

import com.bgs.eat.config.BaseMapper;
import com.bgs.eat.shop.entity.ShopEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName ShopMapper
 * @Description TODO
 * @Author lzy
 * @Date 2022/10/9 14:55
 **/
@Mapper
public interface ShopMapper extends BaseMapper<ShopEntity> {

    /**
    * @Description 新增店铺信息（门户展示）
    * @Author lzy
    * @Date 2022/10/17 15:10
    * @Return java.lang.Integer
    * @param shopEntity
    */
    @Insert("insert into shop(" +
            "shop_name," +
            "lng," +
            "lat," +
            "create_time," +
            "province_id," +
            "city_id," +
            "county_id," +
            "del_flag," +
            "phone," +
            "contact_name," +
            "shop_logo," +
            "address," +
            "eat_in_type_ids," +
            "eat_in," +
            "take_out_phone," +
            "facade_image_id," +
            "operation_type_id," +
            "amount," +
            "score," +
            "min_price)values(" +
            "#{shopName}," +
            "#{lng}," +
            "#{lat}," +
            "#{createTime}," +
            "#{provinceId}," +
            "#{cityId}," +
            "#{countyId}," +
            "#{delFlag}," +
            "#{phone}," +
            "#{contactName}," +
            "#{shopLogo}," +
            "#{address}," +
            "#{eatInTypeIds}," +
            "#{eatIn}," +
            "#{takeOutPhone}," +
            "#{facadeImageId}," +
            "#{operationTypeId}," +
            "#{amount}," +
            "#{score}," +
            "#{minPrice}" +
            ")")
    Integer saveShop(ShopEntity shopEntity);


}
